<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var i=1;
    var a=0;
    while(i<=100){
        document.write(i+" ");
        i++;
    }
    i=1;
    while(i<=100){
        a+=i;
        i++;
    }
    console.log("数字和是"+a)
    a=0
    i=1
    while(i<=60){
        if(i%2!=0){
            a+=i
        }
        i++;
    }
    console.log("奇数和是"+a)
    a=0
    i=1
    while(i<=100){
        if(i%7!=0){
            a+=i;
        }
        i++;
    }
    console.log("除了7以外的和是："+a)
    a=0
    i=1
    while(i<=100){
        if(i%7==0||(i%10==7)||(parseInt(i/10)==7)){
            a+=i;
        }
        i++;
    }
    console.log("7的倍数和是："+a)
    i=2000;
    a=0;
    while(i<=3000){
        if(i%4==0&&i%100!=0||i%400==0){
            a++;
        }
        i++
    }
    console.log("有"+a+"个闰年")
</script>